package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"lucky/api/internal/config"
	"lucky/luckyrpc/luckyrpcclient"
)

type ServiceContext struct {
	Config   config.Config
	LuckyRpc luckyrpcclient.Luckyrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		LuckyRpc: luckyrpcclient.NewLuckyrpc(zrpc.MustNewClient(c.LuckyRpc)),
	}
}
